{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>CISCO</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!-- bootstrap 3.0.2 -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <link href="{% static 'bootstrap/css/bootstrap.min.css' %}" rel="stylesheet" type="text/css"/>
    <!-- font Awesome -->
    <link href="{% static 'bootstrap/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css"/>
    <!-- Ionicons -->
    <link href="{% static 'bootstrap/css/ionicons.min.css' %}" rel="stylesheet" type="text/css"/>
    <!-- Theme style -->
    <link href="{% static 'bootstrap/css/AdminLTE.css' %}" rel="stylesheet" type="text/css"/>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
</head>
<body class="skin-blue">

<!-- header logo: style can be found in header.less -->
<header class="header">
    <a href="index.html" class="logo">
        <!-- Add the class icon to your logo image or logo icon to add the margining -->
        CISCO-EP1
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top" role="navigation">
        <!-- Sidebar toggle button-->
        <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">cisco</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>

    </nav>
</header>
<div class="wrapper row-offcanvas row-offcanvas-left">
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="left-side sidebar-offcanvas">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="{% static 'bootstrap/img/avatar5.png' %}" class="img-circle" alt="User Image"/>
                </div>
                <div class="pull-left info">
                    <p>Hello</p>
                </div>
            </div>
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search..."/>
                    <span class="input-group-btn">
                                <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i
                                        class="fa fa-search"></i></button>
                            </span>
                </div>
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
           <ul class="sidebar-menu">
                <li class="active">
                    <a href="../save_xml">
                        <i class="fa fa-dashboard"></i> <span>Interface Information</span>
                    </a>
                </li>
                <li class="active">
                    <a href="../add_interFaceFromTable">
                        <i class="glyphicon glyphicon-plus"></i> <span>Add Interface</span>
                    </a>
                </li>
                <li class="active">
                    <a href="../load_deletp_page">
                        <i class="glyphicon glyphicon-trash"></i> <span>Delete Interface</span>
                    </a>
                </li>
                <li class="active">
                    <a href="../show_all_interface">
                        <i class="glyphicon glyphicon-zoom-in"></i> <span>Show ALL Interface</span>
                    </a>
                </li>
                <li class="active">
                    <a href="../parsexml">
                        <i class="glyphicon glyphicon-edit"></i> <span>InterFace Control</span>
                    </a>
                </li>

            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>

                Interface Information
                <small>Control panel</small>
            </h1>

        </section>

        <!-- Main content -->


        <section class="content">

            <table class="table">
                <caption id="uuid" style="color: #00ad29;font-size: medium"></caption>
            </table>
            <table class="table">
                <caption>interface1</caption>
                <thead>
                <tr>
                    <th>KEY</th>
                    <th>VALUE</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>interface name</td>
                    <td id="interface_name"></td>
                </tr>
                <tr>
                    <td>interface type @xmlns:ianaift</td>
                    <td id="interface_type_xmlns"></td>
                </tr>
                <tr>
                    <td>interface type #text</td>
                    <td id="interface_type_text"></td>
                </tr>
                <tr>
                    <td>interface admin-status</td>
                    <td id="interface_admin_status"></td>
                </tr>
                <tr>
                    <td>interface oper-status</td>
                    <td id="interface_oper_status"></td>
                </tr>


                <tr>
                    <td>interface last-change</td>
                    <td id="interface_last_change"></td>
                </tr>
                <tr>
                    <td>interface phys-address</td>
                    <td id="interface_phys_address"></td>
                </tr>
                <tr>
                    <td>interface_speed</td>
                    <td id="interface_speed"></td>
                </tr>

                </tbody>
            </table>
            <table class="table">
                <caption>interface2</caption>
                <thead>
                <tr>
                    <th>KEY</th>
                    <th>VALUE</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>interface name</td>
                    <td id="interface_name1"></td>
                </tr>
                <tr>
                    <td>interface type @xmlns:ianaift</td>
                    <td id="interface_type_xmlns1"></td>
                </tr>
                <tr>
                    <td>interface type #text</td>
                    <td id="interface_type_text1"></td>
                </tr>
                <tr>
                    <td>interface admin-status</td>
                    <td id="interface_admin_status1"></td>
                </tr>
                <tr>
                    <td>interface oper-status</td>
                    <td id="interface_oper_status1"></td>
                </tr>


                <tr>
                    <td>interface last-change</td>
                    <td id="interface_last_change1"></td>
                </tr>
                <tr>
                    <td>interface phys-address</td>
                    <td id="interface_phys_address1"></td>
                </tr>
                <tr>
                    <td>interface_speed</td>
                    <td id="interface_speed1"></td>
                </tr>

                </tbody>
            </table>


            <script>
                {#var dict = {{ data|safe }}#}
                {#    alert(dict)#}
                {#    alert(dict['rpc-reply']['@xmlns'])#}
                {#alert(111)#}
                $(function () {
                    var dict = {{ data|safe }}
                        $("#uuid").append(dict['rpc-reply']['@message-id'])
                    {#alert(dict['rpc-reply']['data']['interfaces-state']['interface'][0]['name'])#}
                    $("#interface_name").append(dict['rpc-reply']['data']['interfaces-state']['interface'][0]['name'])
                    $("#interface_type_xmlns").append(dict['rpc-reply']['data']['interfaces-state']['interface'][0]['type']['@xmlns:ianaift'])
                    $("#interface_type_text").append(dict['rpc-reply']['data']['interfaces-state']['interface'][0]['type']['#text'])
                    $("#interface_admin_status").append(dict['rpc-reply']['data']['interfaces-state']['interface'][0]['admin-status'])
                    $("#interface_oper_status").append(dict['rpc-reply']['data']['interfaces-state']['interface'][0]['oper-status'])
                    $("#interface_last_change").append(dict['rpc-reply']['data']['interfaces-state']['interface'][0]['last-change'])
                    $("#interface_phys_address").append(dict['rpc-reply']['data']['interfaces-state']['interface'][0]['phys-address'])
                    $("#interface_speed").append(dict['rpc-reply']['data']['interfaces-state']['interface'][0]['speed'])
                    {#alert(dict['rpc-reply']['data']['interfaces-state']['interface'][1])#}
                    $("#interface_name1").append(dict['rpc-reply']['data']['interfaces-state']['interface'][1]['name'])
                    $("#interface_type_xmlns1").append(dict['rpc-reply']['data']['interfaces-state']['interface'][1]['type']['@xmlns:ianaift'])
                    $("#interface_type_text1").append(dict['rpc-reply']['data']['interfaces-state']['interface'][1]['type']['#text'])
                    $("#interface_admin_status1").append(dict['rpc-reply']['data']['interfaces-state']['interface'][1]['admin-status'])
                    $("#interface_oper_status1").append(dict['rpc-reply']['data']['interfaces-state']['interface'][1]['oper-status'])
                    $("#interface_last_change1").append(dict['rpc-reply']['data']['interfaces-state']['interface'][1]['last-change'])
                    $("#interface_phys_address1").append(dict['rpc-reply']['data']['interfaces-state']['interface'][1]['phys-address'])
                    $("#interface_speed1").append(dict['rpc-reply']['data']['interfaces-state']['interface'][1]['speed'])


                })
            </script>


        </section><!-- /.content -->
    </aside><!-- /.right-side -->
</div><!-- ./wrapper -->


<!-- jQuery 2.0.2 -->
<script src="{% static 'bootstrap/js/jquery.min.js' %}"></script>
<!-- Bootstrap -->
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="{% static 'bootstrap/js/app.js' %}" type="text/javascript"></script>

</body>
</html>